﻿using System;
using UnityEngine;

public class Action2000 : GameAction
{
	public class Passport
	{
		public string PassportId { get; set; }
		public string Password { get; set; }
	}
	private ActionResult actionResult;

	public Action2000()
		: base((int)ActionType.SelfRegist)
	{
	}
	/// <summary>
	/// 向服务器发送数据
	/// </summary>
	/// <param name="writer"></param>
	/// <param name="actionParam"></param>
	protected override void SendParameter(NetWriter writer, ActionParam actionParam)
	{
		writer.writeString("DeviceID", GameSetting.Instance.DeviceID);
		writer.writeString("Name", GameSetting.Instance.Pid);
		writer.writeString("PWD", GameSetting.Instance.Password);
	}

	protected override void DecodePackage(NetReader reader)
	{
		Debug.LogError("&&&&&&解包");
		actionResult = new ActionResult();
		actionResult["Name"] = reader.readString();
		actionResult["PWD"] = reader.readString();
	}

	public override ActionResult GetResponseData()
	{
		return actionResult;
	}
}
